package com.ruoyi.teaching.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.teaching.mapper.HolidayMapper;
import com.ruoyi.teaching.domain.Holiday;
import com.ruoyi.teaching.service.IHolidayService;

/**
 * 节假日Service业务层处理
 * 
 * @author sunshine
 * @date 2024-01-19
 */
@Service
public class HolidayServiceImpl implements IHolidayService 
{
    @Autowired
    private HolidayMapper holidayMapper;

    /**
     * 查询节假日
     * 
     * @param id 节假日主键
     * @return 节假日
     */
    @Override
    public Holiday selectHolidayById(Long id)
    {
        return holidayMapper.selectHolidayById(id);
    }

    /**
     * 查询节假日列表
     * 
     * @param holiday 节假日
     * @return 节假日
     */
    @Override
    public List<Holiday> selectHolidayList(Holiday holiday)
    {
        return holidayMapper.selectHolidayList(holiday);
    }

    /**
     * 新增节假日
     * 
     * @param holiday 节假日
     * @return 结果
     */
    @Override
    public int insertHoliday(Holiday holiday)
    {
        return holidayMapper.insertHoliday(holiday);
    }

    /**
     * 修改节假日
     * 
     * @param holiday 节假日
     * @return 结果
     */
    @Override
    public int updateHoliday(Holiday holiday)
    {
        return holidayMapper.updateHoliday(holiday);
    }

    /**
     * 批量删除节假日
     * 
     * @param ids 需要删除的节假日主键
     * @return 结果
     */
    @Override
    public int deleteHolidayByIds(Long[] ids)
    {
        return holidayMapper.deleteHolidayByIds(ids);
    }

    /**
     * 删除节假日信息
     * 
     * @param id 节假日主键
     * @return 结果
     */
    @Override
    public int deleteHolidayById(Long id)
    {
        return holidayMapper.deleteHolidayById(id);
    }
}
